package com.heima.feign.client;

import com.heima.feign.config.ApUserFallBackFactory;
import com.heima.feign.config.DefaultFeignConfiguration;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.entity.ApUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "leadnews-user",configuration = DefaultFeignConfiguration.class,fallbackFactory = ApUserFallBackFactory.class)
public interface ApUserFeignClient {

    @GetMapping("/api/v1/user/{id}")
    ResponseResult<ApUser> findById(@PathVariable Long id);
}
